<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>TextureDialog</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../index.html" TARGET="_top"><img src="images/homeImg.png"></a></p>



<h1>Texture dialog</h1>

<p>The texture dialog allows you to view and modify properties related to a texture attached to a<a href="shapes.htm"> shape</a>. It is accessed by clicking the <strong>Set texture</strong>-item in the <a href="shapeProperties.htm">shape properties</a> dialog:
</p>

<p align=center><img src="images/texture1.jpg"></p>
<p class=imageLabel>[Texture dialog]</p>
<br>

<p>A texture is a bitmap image that can be applied to surfaces in order to make them look <em>more real</em>. Imagine applying a brick texture to a rectangular surface in order to make it look like a brick wall. Following figure illustrates a textured surface:
</p>

<p align=center><img src="images/texture2.jpg"></p>
<p class=imageLabel>[Textured surface]</p>
<br>

<p>
The default way CoppeliaSim applies textures to a shape is by projecting it onto the shape's x/y plane as shown in following figure:
</p>

<p align=center><img src="images/texture3.jpg"></p>
<p class=imageLabel>[Default texture projection method]</p>
<br>

<p>Following 5 texture mapping methods are supported:</p>
<li><strong>Projection</strong> <strong>mapping</strong>: the texure is simply projected onto the X-Y plane of the object (see here above). Texture coordinates will be calculated.</li>
<li><strong>Cylindrical mapping</strong>: the texure is wrapped around the object's Z axis. Texture coordinates will be calculated.</li>
<li><strong>Spherical mapping</strong>: the texure is spherically mapped onto the object. Texture coordinates will be calculated.</li>
<li><strong>Box mapping</strong>: the texure is applied to all 6 faces of a box-like object. Texture coordinates will be calculated.</li>
<li><strong>Imported texture coordinates</strong>: specific texture coordinates can be imported at the same time as the mesh is <a href="importExport.htm">imported</a>, via the OBJ or DAE file format.</li>

<p>Following figure illustrates the 5 mapping methods:</p>


<p align=center><img src="images/texture6.jpg"></p>
<p class=imageLabel>[Texture mapping methods: A) projection, B) cylindrical, C) spherical, D) box, E) imported texture coordinates]</p>
<br>

<p><a name="scaling"></a>When loading a new texture, following dialog will open:</p>
<p align=center><img src="images/texture7.jpg"></p>
<p class=imageLabel>[Texure scaling dialog]</p>
<br>

<p>It is recommended to keep the default settings, in order to keep compatibility to older graphic cards high (when <strong>Scale textures to</strong> is checked, all textures will anyway be resized to a power of 2), and file sizes low.</p>


<p>Once a texture is in memory, it can be  scaled, shifted and rotated before the actual mapping takes place, in order to obtain the desired visual appearance. </p>


<p>Static textures can be loaded by clicking the <strong>Load new texture</strong> button. Following file formats are currently supported:</p>

<li>JPEG</li>
<li>PNG</li>
<li>TGA</li>
<li>BMP</li>
<li>TIFF</li>
<li>GIF</li>

<p>Instead of loading textures from file, you can also select already loaded static textures, or even dynamic textures generated by <a href="visionSensors.htm">vision sensors</a>. Just click the <strong>Select texture from existing textures</strong> button. Note that dynamic textures will only properly be displayed during simulation (and also only if the related vision sensor is properly handled).</p>

<br>
<br>

 </tr>
</table> 
</div>  
  
  
</body>

</html>
